package service.configuration.xstream;

import service.configuration.AssociationType;
import service.configuration.IAssociationConfig;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamConverter;
import com.thoughtworks.xstream.converters.enums.EnumConverter;


@XStreamAlias("association")
public class AssociationConfig implements IAssociationConfig  {
	
	
	@XStreamConverter(value=EnumConverter.class)
	private AssociationType type;
	private String from;
	private String to;
	private String query;
	private String label;
	
	public AssociationConfig(AssociationType type, String from, String to, String query, String label) {
		this.type = type;
		this.from = from;
		this.to = to;
		this.query = query;
		this.label = label;
	}
	
	public AssociationType getType() {
		return type;
	}

	public void setType(AssociationType type) {
		this.type = type;
	}

	public String getFrom() {
		return from;
	}

	public void setFrom(String from) {
		this.from = from;
	}

	public String getTo() {
		return to;
	}

	public void setTo(String to) {
		this.to = to;
	}

	public String getQuery() {
		return query;
	}

	public void setQuery(String sqlquery) {
		this.query = sqlquery;
	}
	
	public String getLabel() {
		return label;
	}

	public void setLabel(String label) {
		this.label = label;
	}
}
